#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define Random(x) (rand() % x)
int sra()
{
	int result;
	int dis = 6;
	result = (Random(dis)) + 1;
	return result;
}
void main()
{
	while (1)
	{
		int goal, score = 0;
		int i,j=1;
		char temp = 'h';
		char input;
		short int game = 1;
		START:while(1)
		{
			system("cls");
			printf("               #MUSIC GAME BUT NO MUSIC#\n");
			printf("                      Start Game");
			if(j==1) printf("    @\n");
			else printf("\n");
			printf("                     How To Play It");
			if(j==2) printf(" @\n");
			else printf("\n");
			printf("\n\n\n\n                    ----------------\n");
			printf("                    |VERSION  1.1.1|\n                    |MADE BY STARCH|");
			input=getch();
			if(input==13 && j==1) j=2;
			else if(input==13 && j==2) j=1;
			else if(input==' ' && j==1) goto GAME;
			else if(input==' ' && j==2) goto HOW;
		}
		HOW:if (1)
		{
			system("cls");
			printf("Press 'd' 'f' 'g' 'h' 'j' 'k' to get scores\n");
			system("pause");
			goto START;
		}
		GAME:while (game = 1)
		{
			 system("cls");
			 goal = sra();       //----------ASStoGoal-----------
			 printf("\n\n\n\n\n\n\n				    SCORE:%d\n				-----------------\n				", score);
			 for (i = 0; i < 6; i++)//----------2DpicturePrint---------
			 {
				 if ((i + 1) == goal)
				 {
					 printf("@@");
				 }
				 else
				 {
					 printf("##");
				 }
				 printf(" ");
				 if (i == 5) printf("\n");
			 }
			 printf("				D |F |G |H |J |K |\n				-----------------");
			 switch (goal)//----------TurnInputToTemp----------
			 {
			 case 1:temp = 'd'; break;
			 case 2:temp = 'f'; break;
			 case 3:temp = 'g'; break;
			 case 4:temp = 'h'; break;
			 case 5:temp = 'j'; break;
			 case 6:temp = 'k'; break;
			 }
			 input = getch();
			 if (input == temp)
			 {
				 score++;
			 }
			 else game = 0;
			 if (game == 0) break;//---------FinishGameLoop---------
		}
		 system("cls");
		 printf("You hava DEAD!\nPress '1' to HUB\nPress '2' to play again\n");
		 input = getch();
		 if (input == '1')
		 {
			 
		 }
		 else if (input == '2')
		 {
			 goto GAME;
		 }
		 
	}
}